package com.blog.common.exception;

import lombok.Data;

@Data
public class BlogException extends RuntimeException{
    private int code;
    private String errMsg;

// 构造函数，用于初始化BlogException对象
    public BlogException(int code, String errMsg) {
        // 将传入的code赋值给对象的code属性
        this.code = code;
        // 将传入的errMsg赋值给对象的errMsg属性
        this.errMsg = errMsg;
    }

    public BlogException(String errMsg) {
        this.errMsg = errMsg;
    }
}
